export RESUME_MODEL='/mnt/afs2d/luotianhang/smartvehicle_diffusion/diffusers/examples/inpainting/cabin-inpainting-model_48_big7_fixdata_data_4090_custom/checkpoint-119500'
# 
# export MODEL_NAME='/mnt/afs2d/luotianhang/smartvehicle_diffusion/diffusers/examples/inpainting/pretrain'
# export MODEL_NAME='/mnt/afs2d/luotianhang/cache/PretrainedModels/models--runwayml--stable-diffusion-inpainting/snapshots/afeee10def38be19995784bcc811882409d066e5'
# export MODEL_NAME='/mnt/afs2d/luotianhang/cache/PretrainedModels/stable-diffusion-v1-5/stable-diffusion-v1-5'
# export MODEL_NAME='/mnt/afs2d/luotianhang/smartvehicle_diffusion/diffusers/examples/inpainting/pretrain_text'
export MODEL_NAME='/mnt/afs2d/luotianhang/smartvehicle_diffusion/diffusers/examples/inpainting/pretrain_ppt'
accelerate launch --config_file=./config.yaml --machine_rank=${RANK} --main_process_ip=${MASTER_ADDR} --main_process_port=${MASTER_PORT} train.py \
    --pretrained_model_name_or_path=$MODEL_NAME \
    --resolution=128  \
    --train_batch_size=7 --gradient_accumulation_steps=4 --gradient_checkpointing \
    --max_train_steps=250000 \
    --checkpointing_steps=500 \
    --checkpoints_total_limit=1 \
    --learning_rate=1e-05 --max_grad_norm=1 --lr_warmup_steps=0 \
    --mixed_precision=fp16 \
    --seed=1204 \
    --num_workers=2 \
    --output_dir=cabin-inpainting-model_48_big7_fixdata_data_4090_custom \
    --enable_xformers_memory_efficient_attention \
    --use_8bit_adam \
    --resume_from_checkpoint=$RESUME_MODEL

